package com.quarters.util.page;





public class PageResult {

	private int curPage = 1; // 当前页
    private int pageSize = 10;
    private int totalCount; // 共多少数据
    private int start;// 当前页起始行
    private int totalPage; // 共多少页
	public int getCurPage() {
		return curPage;
	}
	public void setCurPage(int curPage) {
		this.curPage = curPage;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getStart() {
		return start;
	}
	public void setStart(int start) {
		this.start = start;
	}

	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public PageResult(int curPage,int totalCount) {
		super();
		this.curPage = curPage;
		this.totalCount = totalCount;
		this.start = pageSize*(curPage-1);
		this.totalPage = totalCount%pageSize==0?totalCount/pageSize : totalCount/pageSize+1;
	}
	public PageResult() {
		super();
	}
	@Override
	public String toString() {
		return "PageResult [curPage=" + curPage + ", pageSize=" + pageSize + ", totalCount=" + totalCount + ", start="
				+ start + ", totalPage=" + totalPage + "]";
	}
	
    
}
